package Control;

import javax.swing.JFrame;



import Gui.DirectorWindow;
import Gui.LibrarianWindow;
import Gui.MainScreen;
import Logic.Users;
/**
 * this class is the controller of director 
 * @author Ron Shenkerman
 * @author Gabi Revah
 * @author Aviad Almog
 * @author Ivan Onyshchenko
 */
public class UserDirector extends Users {
	
	private DirectorWindow userWindow;

	 
	private static final long serialVersionUID = 1L;
/**
 * the menthod create new instance of director 
 * @paramget the userName
 * @param get the password
 * @param get the UserLevel
 * @param get if user connected connected
 */
	public UserDirector(String userName, String password, String UserLevel, Boolean connected) 
	{
		super(userName, password, UserLevel, connected);
		System.out.println("UserDirector constructor");
	}

/**
 * this opens the director window 	
 */
	public void OpenWindow() // opens librarian window
	{
		
		System.out.println("SubscriberWindow: Open Window");
		System.out.println("SubscriberWindow: " + super.getUserName());
		userWindow= new DirectorWindow();
		
		MainScreen.card.add("DirectorWindow", userWindow);
		MainScreen.cardLayot.show(MainScreen.card, "DirectorWindow");
		
	
	}
	

}
